package net.sxbang.service;

import net.sxbang.dao.UserDAO;
import net.sxbang.dao.UserDAOImpl;
import net.sxbang.model.User;

public class UserServiceImpl implements UserService {

	private UserDAO userDAO = new UserDAOImpl();
	/*
	 * (non-Javadoc)
	 * @see net.sxbang.service.UserService#login(java.lang.String, java.lang.String)
	 * 2019204163-刘婧
	 */
	
	@Override
	public String login(String username, String password) {
		System.out.println(this.getClass().getName() + "login");
		User user = userDAO.findByUsername(username);
		if (user != null) {
			return "登录成功";
		}
		return "登录失败";
	}

}
